1. Field of the Invention
The present invention relates to an image forming apparatus, an image processing method, and a computer-readable recording medium.
2. Description of the Related Art
When an image is formed with an inkjet printer that forms dots by ink droplets, low-resolution printing at a low resolution is performed in order to increase the productivity. Under such a printing condition, when the printing resolution is lower than the resolution of an input image, it is necessary to perform processing for a conversion into a printable resolution by performing a resolution conversion. A nearest neighbor method, an averaging method, and a weighting method, which will be described below, are known as methods of converting image data into a resolution lower than that of an input image. FIGS. 8 to 12 show these exemplary resolution conversions.
The nearest neighbor method is a conversion method of thinning out image data at regular intervals. The averaging method is a conversion method of thinning out image data after averaging an image per given unit of pixels. The weighting method is a conversion method in which, with reference to the pixel values at adjacent positions, (dark) pixels each having a large pixel value is multiplied by a large coefficient and (light) pixels each having a small pixel value is multiplied by a small coefficient to calculate pixel values after resolution conversion.
When an image, like a CAD drawing (architectural or mechanical design drawing), with a lot of lines in which black and white are clear is printed, the above-described resolution conversion methods have the following disadvantages respectively. In the nearest neighbor method, the processing speed is fast because it suffices if pixels are thinned out according to predetermined rules; however, there may be vertical and horizontal linear missing pixels. Because, for example, no vertical or horizontal line may be printed, the printing quality lowers significantly. Thus, it is not possible to use the nearest neighbor method for CAD drawings in which a missing image is a problematic.
In the averaging method, missing image data that can be seen in the nearest neighbor method does not occur; however, when there are a lot of lines in which black and white are clear in, for example, a CAD drawing, the pixel values of a black part and a white part are averaged and accordingly the pixel values reduce in a wide area, so that the lines are expressed lighter and bolder and the quality of the lines thus deteriorates.
In weighting method, because missing image data that can be seen in the nearest neighbor method does not occur and a reduction in the pixel value that can be seen in the averaging method is not caused, the printing quality hardly lowers in an image of, for example, lines or characters in which black and white are clear; however, when there are multiple sets of image data in the same form in an input image, the width or height of the image data after resolution conversion may change depending on the set of coordinates of the image data and accordingly a difference may be caused between the printing results even they originate from the same image data (see FIG. 12, which will be described below). This may be a significant problem when lines each having a narrow width, i.e., “fine lines”, are to be expressed. This problem may occur also in the above-described nearest neighbor method and the averaging method.
A method is disclosed in which, when printing at a resolution reduced from that of an input image is performed, the nearest neighbor method and the averaging method are selectable according to the enlarging or reducing processing on the input image for the purpose of balancing the printing quality and the processing speed (see, for example, Japanese Laid-open Patent Publication No. 2013-66002).
The above-described conventional resolution conversion method, however, has a problem in that a difference occurs in the line quality. According to Japanese Laid-open Patent Publication No. 2013-66002, even when there are multiple sets of image data in the same shape in an input image, the width or height of the image data after resolution conversion may change depending on the set of coordinates of the image data and accordingly a difference may be caused in the printing results although they originate from the image data of the same shape.
In view of the above-described circumstances, there is a need to prevent missing image data and lowering of the image quality and also prevent a difference caused in the quality of printing lines.